/**
 * @fileOverview Collection of widgets have model is widget
 * @author Le Duc, Nam (lenam.k54@gmail.com)
 * @copyright VIT Coder group
 */
define(['backbone', 'text!models/data/buttons.json', 'models/widget'], function (Backbone, Data, Widget) {
    return Backbone.Collection.extend({
        model: Widget,
        data: JSON.parse(Data),
        initialize: function () {
            var this_ = this;
            _.each(this_.data, function (widgetData) {
                this_.add(new Widget(widgetData));
            });
        }
    });
});